package io.github.uicdb.et;

import io.github.uicdb.et.recipe.ElementRecipe;
import io.github.uicdb.et.recipe.ExtractRecipe;
import io.github.uicdb.et.recipe.TurnInRecipe;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.neoforge.registries.RegisterEvent;

public class ModRecipes {
    public static void init(IEventBus modEventBus) {
        modEventBus.addListener(RegisterEvent.class, event -> {
            event.register(Registries.RECIPE_TYPE, ResourceLocation.fromNamespaceAndPath(ElementalTheory.MODID, "extract_recipe"), () -> ExtractRecipe.TYPE);
            event.register(Registries.RECIPE_SERIALIZER, ResourceLocation.fromNamespaceAndPath(ElementalTheory.MODID, "extract_recipe"), () -> ExtractRecipe.Serializer.INSTANCE);

            event.register(Registries.RECIPE_TYPE, ResourceLocation.fromNamespaceAndPath(ElementalTheory.MODID, "element_recipe"), () -> ElementRecipe.TYPE);
            event.register(Registries.RECIPE_SERIALIZER, ResourceLocation.fromNamespaceAndPath(ElementalTheory.MODID, "element_recipe"), () -> ElementRecipe.Serializer.INSTANCE);

            event.register(Registries.RECIPE_TYPE, ResourceLocation.fromNamespaceAndPath(ElementalTheory.MODID, "turn_in_recipe"), () -> TurnInRecipe.TYPE);
            event.register(Registries.RECIPE_SERIALIZER, ResourceLocation.fromNamespaceAndPath(ElementalTheory.MODID, "turn_in_recipe"), () -> TurnInRecipe.Serializer.INSTANCE);
        });
    }
}
